package com.newhonor.server.utils;

import com.newhonor.server.pojo.Admin;
import org.springframework.security.core.context.SecurityContextHolder;

/**
 * @Author newhonor
 * @Date 2021/2/23 16:42
 * @Version 1.0
 **/
public class AdminUtils {
    public static Admin getCurrentAdmin(){
        return (Admin) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
    }
}
